package com.yzh.design.demo.factory.impl;

import com.yzh.design.demo.factory.ICacheAdapter;
import com.yzh.design.demo.matter.IIR;

import java.util.concurrent.TimeUnit;

public class IIRCacheAdapter implements ICacheAdapter {
    IIR iir = new IIR();

    @Override
    public String get(String key) {
        return iir.get(key);
    }

    @Override
    public void set(String key, String val) {
        iir.set(key, val);
    }

    @Override
    public void set(String key, String val, long timeout, TimeUnit timeUnit) {
        iir.setExpire(key, val, timeout, timeUnit);
    }

    @Override
    public void del(String key) {
        iir.del(key);
    }
}
